{* Smarty *}
{*
 *  This file is part of Urd.
 *
 *  Urd is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *  Urd is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program. See the file "COPYING". If it does not
 *  exist, see <http://www.gnu.org/licenses/>.
 *
 * $LastChangedDate: 2008-06-14 11:01:35 +0200 (Sat, 14 Jun 2008) $
 * $Rev: 1161 $
 * $Author: styck $
 * $Id: admin_tasks.tpl 1161 2008-06-14 09:01:35Z styck $
 *}

<input type="hidden" name="order" id="order" value="{$order}"/>
<input type="hidden" name="order_dir" id="order_dir" value="{$order_dir}"/>
<table class="tasks">
<tr class="head">
<th onclick="javascript:submit_search_tasks('description', 'asc');" class="cursor_hand">{$LN_tasks_description}</th>
<th onclick="javascript:submit_search_tasks('progress', 'asc');" class="cursor_hand">{$LN_tasks_progress}</th>
<th onclick="javascript:submit_search_tasks('status', 'asc');" class="cursor_hand">{$LN_tasks_status}</th>
<th onclick="javascript:submit_search_tasks('ETA', 'asc');" class="cursor_hand">{$LN_tasks_eta}</th>
<th onclick="javascript:submit_search_tasks('starttime', 'asc');" class="cursor_hand">{$LN_tasks_added}</th>
<th onclick="javascript:submit_search_tasks('lastupdate', 'asc');" class="cursor_hand">{$LN_tasks_lastupdated}</th>
<th onclick="javascript:submit_search_tasks('comment', 'asc');" class="cursor_hand">{$LN_tasks_comment}</th>
<th>{$LN_actions}</th>
</tr>

{section name=x loop=$alltasks}
<tr  class="{cycle values="even,odd" name="cycle1"}">
<td {if $alltasks[x].task_popup neq "@"} {popup text=$alltasks[x].task_popup|escape } {/if} >{$alltasks[x].description|replace:'[b]':'<b>'|replace:'[/b]':'</b>'}</td>
<td>{$alltasks[x].progress}%</td>
<td>{$alltasks[x].status}</td>
<td>{$alltasks[x].eta}</td>
<td>{$alltasks[x].added}</td>
<td>{$alltasks[x].lastupdated}</td>
<td>{$alltasks[x].comment}</td>
<td> 
{if $urdd_online eq 1}
{if $alltasks[x].raw_status == 'Queued' or $alltasks[x].raw_status == 'Paused' or $alltasks[x].raw_status == 'Running'}
<img src="{$IMGDIR}/icon_cancel.png" alt="Cancel" {popup text=$LN_transfers_linkcancel}  onclick="javascript:task_action('cancel', '{$alltasks[x].urdd_id|escape:javascript}', '{$LN_success2|capitalize}', '{$LN_failed|capitalize}');"/>
{/if}
{if $alltasks[x].raw_status == 'Queued' or $alltasks[x].raw_status == 'Paused'}
<img src="{$IMGDIR}/icon_play.png" alt="start" {popup text=$LN_transfers_linkstart}  onclick="javascript:task_action('continue', '{$alltasks[x].urdd_id|escape:javascript}', '{$LN_success2|capitalize}', '{$LN_failed|capitalize}');"/>
{/if}
{if $alltasks[x].raw_status == 'Queued'  or $alltasks[x].raw_status == 'Running'}
<img src="{$IMGDIR}/icon_pause.png" alt="pause" {popup text=$LN_transfers_linkpause}  onclick="javascript:task_action('pause', '{$alltasks[x].urdd_id|escape:javascript}', '{$LN_success2|capitalize}', '{$LN_failed|capitalize}');"/>
{/if}
{else}&nbsp;{/if}
</td>
</tr>
{/section}
</table>
<input type="hidden" name="challenge" id="challenge_tasks" value="{$challenge}"/>
